<template>
	<view class="content" v-if="vuex_token">
		<image class="logo" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">
				您好 - {{ vuex_user.nickName }}
			</text>
		</view>
		<view class="button-demo">
			<u-button :ripple="true" @click="logout">退出登录</u-button>
		</view>
	</view>
</template>

<script>
export default {
  data() {
    return {
      title: 'Hello'
		}
  },
  onLoad() {
		this.$dy_tool.forceLogin(this.vuex_token)
  },
  methods: {
		logout() {
			// this.$u.api.fedLogOut()

			// 返回上一页
			// #ifdef H5
			history.back()
			return
			// #endif
			uni.navigateBack()
		}
  }
}
</script>

<style lang="scss" scoped>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 40rpx;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 100rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 28rpx;
		color: $u-content-color;
	}
	
	.button-demo {
		margin-top: 80rpx;
	}
</style>
